const nodata = require('../tw-lib-base/no-data/props')
const commonProps = require('../tw-lib-base/chart/common-props')
// const axisProps = require('../tw-lib-base/chart/axis-props')
// const datazoomProps = require('../tw-lib-base/chart/datazoom-props')
const tooltipProps = require('../tw-lib-base/chart/tooltip-props')

module.exports = {
  ...commonProps,

  // ...axisProps,
  // ...datazoomProps,
  ...tooltipProps,

  data: {
    type: Array,
    default () {
      return [
        ['姓名', '数值'],
        ['语文', 43.3],
        ['数学', 83.1],
        ['英语', 86.4],
        ['物理', 84.4]
      ]
    },
    name: '图表数据集',
    filedType: 'api'
  },

  showTitle: {
    type: Boolean,
    default: true,
    name: '显示标题',
    filedType: 'switch'
  },
  titleText: {
    type: String,
    default: '图表标题',
    name: '图表标题',
    filedType: 'string'
  },
  subtitleText: {
    type: String,
    default: '图表副标题',
    name: '图表副标题',
    filedType: 'string'
  },
  showTotal: {
    type: String,
    default: '1',
    name: '总和显示在图表',
    filedType: 'select',
    options: [
      {
        name: '不显示',
        value: '0'
      },
      {
        name: '图表标题',
        value: '1'
      },
      {
        name: '图表副标题',
        value: '2'
      }
    ],
    // 是否支持多选，支持多选时default要指定为数组
    multiple: false
  },
  titleTop: {
    type: String,
    default: '40%',
    name: '标题顶部位置',
    filedType: 'string'
  },
  titleLeft: {
    type: String,
    default: '49.5%',
    name: '图表副标题',
    filedType: 'string'
  },
  titleColor: {
    type: String,
    default: '#333',
    name: '主标题颜色',
    filedType: 'color'
  },
  subtitleColor: {
    type: String,
    default: '#aaa',
    name: '副标题颜色',
    filedType: 'color'
  },
  titleFontSize: {
    type: String,
    default: '18',
    name: '主标题字体大小',
    filedType: 'string'
  },
  titleFontWeight: {
    type: String,
    default: '400',
    name: '主标题字体加粗',
    filedType: 'string'
  },
  subtitleFontSize: {
    type: String,
    default: '12',
    name: '副标题字体大小',
    filedType: 'string'
  },
  innerRadius: {
    type: String,
    default: '60%',
    name: '环图内半径',
    filedType: 'string'
  },
  outerRadius: {
    type: String,
    default: '80%',
    name: '环图外半径',
    filedType: 'string'
  },
  showLabel: {
    type: Boolean,
    default: true,
    name: '显示文本标签',
    filedType: 'switch'
  },
  triggerType: {
    type: String,
    default: 'item',
    name: '触发类型',
    filedType: 'string'
  },
  startAngle: {
    type: String,
    default: '90',
    name: '起始角度',
    filedType: 'string'
  },
  showLabelLine: {
    type: Boolean,
    default: true,
    name: '显示外环标签线',
    filedType: 'switch'
  },
  labelLineLength: {
    type: String,
    default: '10',
    name: '外环标签线长度',
    filedType: 'string'
  },
  labelLineLength1: {
    type: String,
    default: '10',
    name: '外环标签线1长度',
    filedType: 'string'
  },

  showAxis: {
    type: Boolean,
    default: false,
    name: '显示坐标轴',
    filedType: 'switch'
  },
  formatter: {
    type: String,
    default: '',
    name: '标签格式',
    filedType: 'string'
  },

  seriesFontSize: {
    type: String,
    default: '14',
    name: '标签字体大小',
    filedType: 'string'
  },
  legendwidth: {
    type: String,
    default: '100%',
    name: 'legend宽度',
    filedType: 'string'
  },
  piecenter: {
    type: String,
    default: '50%,50%',
    name: '中心点位置',
    filedType: 'string'
  },

  ...nodata
}
